from collections.abc import Sequence
from typing import Any, final

@final
class BytesExtractor:
    def __new__(cls, /) -> BytesExtractor: ...
    @staticmethod
    def from_buffer(buf: Any) -> int: ...
    @staticmethod
    def from_bytes(bytes: bytes) -> int: ...
    @staticmethod
    def from_str(string: str) -> int: ...
    @staticmethod
    def from_str_lossy(string: str) -> int: ...

def map_byte_cow(bytes: Sequence[int]) -> bytes: ...
def map_byte_slice(bytes: bytes) -> bytes: ...
def map_byte_vec(bytes: Sequence[int]) -> bytes: ...
def return_memoryview() -> memoryview: ...
